d0f1e4a783b7f30cc9c23692b44c9afcbb9518cc,cdap-app-fabric/src/main/java/co/cask/cdap/config/DefaultConfigStore.java,DefaultConfigStore,delete,#String#String#String#,95

Before Change



  @Override
  public void delete(final String namespace, final String type, final String id) throws Exception {
    txnl.executeUnchecked(new TransactionExecutor.Function<ConfigTable, Void>() {
      @Override
      public Void apply(ConfigTable configTable) throws Exception {
        if (configTable.table.get(rowKey(namespace, type), Bytes.toBytes(id)) == null) {
          throw new ConfigNotFoundException(namespace, type, id);
        }
        configTable.table.delete(rowKey(namespace, type), Bytes.toBytes(id));
        return null;
      }
    });
  }

  @Override

After Change



  @Override
  public void delete(final String namespace, final String type, final String id) throws ConfigNotFoundException {
    Boolean success = txnl.executeUnchecked(new TransactionExecutor.Function<ConfigTable, Boolean>() {
      @Override
      public Boolean apply(ConfigTable configTable) throws Exception {
        if (configTable.table.get(rowKey(namespace, type), Bytes.toBytes(id)) == null) {
          return false;
        }
        configTable.table.delete(rowKey(namespace, type), Bytes.toBytes(id));
        return true;
      }
    });

    if (!success) {
      throw new ConfigNotFoundException(namespace, type, id);
    }
  }